﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ForumDB
{
	class MainProgram
	{


		static void Main(string[] args)
		{

			DataLogic program = new DataLogic();
			//Location p = new Location();
			DateTime date;


			Console.WriteLine(program.getAllSubForum(5, 1).getSubForumInfo());
			Console.WriteLine(program.getAllSubForum(5, 3).getId(5));
			Console.WriteLine(program.getAllThread(1, 5, 1).getId(4));
			Console.WriteLine(program.getThreadTitle(43));
			Console.WriteLine(program.getPost(333));

			 
			/*
			program.addThread(41, "41 ADD THREAD TITLE", "41 ADD POST BODY", "41 ADD THREAD CLIENT", DateTime.Now);
			program.addThread(41, "41 2ADD THREAD TITLE", "41 2ADD POST BODY", "41 2ADD THREAD CLIENT", DateTime.Now);
			program.addPost(57, "57 ADD POST TITLE", "48 ADD POST BODY", "48 ADD POST CLIENT", DateTime.Now);
			program.addPost(57, "57 3 ADD POST TITLE", "48 3 ADD POST BODY", "48 3 ADD POST CLIENT", DateTime.Now);
			program.addPost(58, "58 ADD POST TITLE", "49 ADD POST BODY", "49 ADD POST CLIENT", DateTime.Now);
			program.removeSubForum(41);
			*/

			//program.addPost(4, "3 ADD POST TITLE", "3 ADD POST BODY", "3 ADD POST CLIENT", DateTime.Now);
			//Console.WriteLine(program.editPost(3, "edit", "edit", "edit", DateTime.Now));
			//Console.WriteLine(program.editThread(3, "edit", "edit", "edit", DateTime.Now));


			//program.addPost(4, "3 ADD POST TITLE", "3 ADD POST BODY", "3 ADD POST CLIENT", DateTime.Now);
			//program.addPost(4, "33 ADD POST TITLE", "33 ADD POST BODY", "33 ADD POST CLIENT", DateTime.Now);
			//program.removePost(6);
			

			//MUST ADD SUBFORUM FIRST THEN THREADS SECOND, AND POSTS THIRD: 

			//date = DateTime.Now;
			//program.addSubForum("ADD SUBFORUMS TITLE", "MODERATOR", date);

			//p.id = 1;
			//date = DateTime.Now;
			//program.addThread(p, "ADD THREAD TITLE", "ADD POST BODY", "ADD THREAD CLIENT", date);

			//p.id = 1;
			//date = DateTime.Now;
			//program.addPost(p, "ADD POST TITLE", "ADD POST BODY", "ADD POST CLIENT", date);



		}
	}
}





/*


			Program program = new Program();

			Location p = new Location();
			//p.tableName = "Posts";
			//p.id = 1;

			//starting  now we will use specific methods
			//program.getPage(p, 1, 1).getInfo();
			// need to handle exceptions like p.id = 0; or out of bounds id

			p.id = 1;
			program.getPost(p, 1, 1).getInfo();

			p.id = 2;
			program.getPost(p, 1, 1).getInfo();

			p.id = 1;
			program.getThread(p, 1, 1).getInfo();

			p.id = 1;
			program.getSubForum(p, 1, 1).getInfo();

			p.id = 1;
			DateTime date = DateTime.Now;
			program.addPost(p, "ADD POST TITLE", "ADD POST BODY", "ADD POST CLIENT", date);


			p.id = 1;
			program.addPost(p, "ADD POST TITLE", "ADD POST BODY", "ADD POST CLIENT", date);
			//p.id = 2;
			//program.removeThread(p);


*/